package com.glela.goods.model.vo;

import java.util.Date;

import com.glela.goods.model.Inventory;

/**
 * @author liujie
 * @2016年10月28日
 */
public class InventoryVo extends Inventory {
	private int		talentLimit;	//会员佣金比例
	private int		scoreRate;		//妆币
	private int		operateCosting;	//运营成本
	private String	productBn;		//货号
	private String	goodName;		//商品名称
	private int		selfSupport;	//0自营,1非自营
	private int		goodsType;		//商品类型 0:c区商品，1:b区商品
	private int		applywelfareId;	//商品归属分类 （1.正常2.福利社 3体验）
	private int		brandId;		//品牌id
	private String	brandName;
	private String	specName;
	private Date	onlineTime;		//上线时间
	private Date	offlineTime;	//下线时间
	private boolean	isOpenGoods;	//是否是开店商品

	/** 会员佣金比例 */
	public int getTalentLimit() {
		return talentLimit;
	}

	/** 会员佣金比例 */
	public void setTalentLimit(int talentLimit) {
		this.talentLimit = talentLimit;
	}

	/** 妆币 */
	public int getScoreRate() {
		return scoreRate;
	}

	/** 妆币 */
	public void setScoreRate(int scoreRate) {
		this.scoreRate = scoreRate;
	}

	/** 运营成本 */
	public int getOperateCosting() {
		return operateCosting;
	}

	/** 运营成本 */
	public void setOperateCosting(int operateCosting) {
		this.operateCosting = operateCosting;
	}

	/** 货号 */
	public String getProductBn() {
		return productBn;
	}

	/** 货号 */
	public void setProductBn(String productBn) {
		this.productBn = productBn;
	}

	/** 商品名称 */
	public String getGoodName() {
		return goodName;
	}

	/** 商品名称 */
	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}

	/** 0自营,1非自营 */
	public int getSelfSupport() {
		return selfSupport;
	}

	/** 0自营,1非自营 */
	public void setSelfSupport(int selfSupport) {
		this.selfSupport = selfSupport;
	}

	public int getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(int goodsType) {
		this.goodsType = goodsType;
	}

	/** 商品归属分类 （1.正常2.福利社 3体验） */
	public int getApplywelfareId() {
		return applywelfareId;
	}

	/** 商品归属分类 （1.正常2.福利社 3体验） */
	public void setApplywelfareId(int applywelfareId) {
		this.applywelfareId = applywelfareId;
	}

	public int getBrandId() {
		return brandId;
	}

	public void setBrandId(int brandId) {
		this.brandId = brandId;
	}

	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	public String getSpecName() {
		return specName;
	}

	public void setSpecName(String specName) {
		this.specName = specName;
	}

	/** 上线时间 */
	public Date getOnlineTime() {
		return onlineTime;
	}

	/** 上线时间 */
	public void setOnlineTime(Date onlineTime) {
		this.onlineTime = onlineTime;
	}

	/** 下线时间 */
	public Date getOfflineTime() {
		return offlineTime;
	}

	/** 下线时间 */
	public void setOfflineTime(Date offlineTime) {
		this.offlineTime = offlineTime;
	}

	/** 是否是开店商品true是false:不是 */
	public boolean isOpenGoods() {
		return isOpenGoods;
	}

	/** 是否是开店商品true是false:不是 */
	public void setOpenGoods(boolean isOpenGoods) {
		this.isOpenGoods = isOpenGoods;
	}

	/** 已上架 */
	public boolean isOnTheShelf(long timeMilles) {
		if (getOnlineTime() != null && getOfflineTime() != null) {
			if (getOnlineTime().getTime() <= timeMilles && getOfflineTime().getTime() >= timeMilles) {
				return true;
			}
		}
		return false;
	}

	/** 未上架 */
	public boolean isNotOnTheShelf(long timeMilles) {
		return !isOnTheShelf(timeMilles);
	}
}
